package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.RepairBbsFallBack;
import cn.cs.fallback.RepairComplaintFallBack;
import cn.cs.pojo.RepairComplaint;
import cn.cs.pojo.RepairComplaintNode;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = RepairComplaintFallBack.class)
public interface RepairComplaintClient {


    @RequestMapping(value = "/getRepairComplaintById", method = RequestMethod.POST)
    public RepairComplaint getRepairComplaintById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getRepairComplaintListByMap", method = RequestMethod.POST)
    public List<RepairComplaint> getRepairComplaintListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getRepairComplaintCountByMap", method = RequestMethod.POST)
    public Integer getRepairComplaintCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/addRepairComplaint", method = RequestMethod.POST)
    public Integer addRepairComplaint(@RequestBody RepairComplaint repairComplaint) throws Exception;

    @RequestMapping(value = "/modifyRepairComplaint", method = RequestMethod.POST)
    public Integer modifyRepairComplaint(@RequestBody RepairComplaint repairComplaint) throws Exception;

    @RequestMapping(value = "/deleteRepairComplaintById", method = RequestMethod.POST)
    public Integer deleteRepairComplaintById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getPersonByCode", method = RequestMethod.POST)
    public Map<String, Object> getPersonByCode(@RequestParam("code") String code) throws Exception;

    @RequestMapping(value = "/addRepairComplaintNode", method = RequestMethod.POST)
    public Integer addRepairComplaintNode(@RequestBody RepairComplaintNode repairComplaint) throws Exception;

    @RequestMapping(value = "/getRepairComplaintNodeCountByMap", method = RequestMethod.POST)
    public Integer getRepairComplaintNodeCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getRepairComplaintNodeListByMap", method = RequestMethod.POST)
    public List<RepairComplaintNode> getRepairComplaintNodeListByMap(@RequestBody Map<String, Object> param) throws Exception;

}

